package com.dailywork.basepro.thread.executors;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 多任务线程框架
 *
 * @author think
 * @version 1.0.0
 * @since 2020/4/25
 */
public class UseExecutors {

    public static void main(String[] args) {

        ExecutorService pool = Executors.newFixedThreadPool(10); // 定义固定的线程池数量

        ExecutorService pool2 = Executors.newSingleThreadExecutor();

        ExecutorService pool3 = Executors.newCachedThreadPool();

        ExecutorService pool4 = Executors.newScheduledThreadPool(10);
    }
}
